package com.jinbo.sxzq;

import android.util.Log;

/***********棋子兔********************/
public class Chess_Tu extends Chess{
    Chess_Tu(int type, int index, int[] location, int owner, GameControl gameControl) {
        /********初始化信息****************/
        super(index, location, owner, gameControl);
        this.type = type;
        this.name = ProjectConstants.ChessName.TU;
        this.message = ProjectConstants.ChessMasage.TU;
        this.type = ProjectConstants.ChessType.TU;
        this.hp = 1;
        this.maxHp = 1;
        this.mp = 0;
        this.maxMp = 2;
        this.mobility = 2;
        this.maxmobility = 2;
        this.atk = 1;
    }

    public void Action(){
        super.Action();
    }

    public void Move(Chess chess){
        super.Move(chess);
    }

    public void Attack(Chess chess){
        chess.hp = chess.hp - this.atk;
        mobility--;
        if(chess.hp <= 0){
            this.Kill(chess);
        }
    }

    public void RoundNext(){
        super.RoundNext();
    }

    //重写技能兔：【迅捷】消耗所有能量获得消耗能量的行动力,且可以攻击多次。
    public void Skill(){
        Log.e("Skill——兔" , "触发技能");
        mobility = mobility + mp;
        mp = 0;
    }

    public void Kill(Chess chess){
        super.Kill(chess);
    }
}
